﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>接口规范2019</title>
</head>
<body>
    接口规范说明（仅供内部使用，请勿外传）<br />

    <h4>一、注册</h4>
    <br />
    <b>1.1、客户主动注册</b><br />
    <br />
    方法名：CustomerLogin<br />
    <br />

    请求参数：{
    \"Name\": \"shunyi\",
    \"Pwd\": \"456456\"
}<br />
    <br />

    返回结果：{"msgcode":1,"msginfo":"恭喜，登录成功"}<br />
    <br />

    <b>1.2、客户主动注册帐号或手机号是否已存在</b><br />
    <br />
    方法名：CustomerRegIsExist<br />
    <br />

    请求参数：{\"UserName\":\"shunyi\"}或{\"Mobile\":\"13530416858\"}<br />
    <br />

    返回结果：{"msgcode":0,"msginfo":"手机号已存在"}<br />
    {"msgcode":0,"msginfo":"帐号已存在"}<br />
    <br />

    <h4>二、登录</h4>
    <br />
    <b>2.1、客户登录</b><br />
    <br />
    方法名：CustomerLogin<br />
    <br />

    请求参数：{
    \"Name\": \"shunyi\",
    \"Pwd\": \"456456\"
}<br />
    <br />

    返回结果：{"msgcode":1,"msginfo":"恭喜，登录成功"}<br />
    <br />

    <b>2.2、团队登录</b><br />
    <br />
    方法名：UserLogin<br />
    <br />

    请求参数：{
    \"Name\": \"esazb\",
    \"Pwd\": \"123456\"
}<br />
    <br />

    返回结果：{"msgcode":1,"msginfo":"恭喜，登录成功"}<br />
    <br />

    <h4>三、密码重置</h4>
    <br />
    <b>3.1、客户重置密码：第一步，客户通过帐号和手机号或昵称验证通过。第二步，设置新密码</b><br />
    <br />
    方法名：CustomerForgotPassword<br />
    <br />

    请求参数：{\"UserName\":\"esazb\",\"Mobile\":\"\",\"NickName\":\"lsy\"}<br />
    <br />

    返回结果：{"msgcode":1,"msginfo":"验证通过，立即设置新密码"}<br />
    {"msgcode":0,"msginfo":"验证失败:帐号必填，手机号和昵称二选一"}<br />
    <br />

    <h4>四、修改密码</h4>
    <br />
    <b>4.1、客户修改密码</b><br />
    <br />
    方法名：CustomerModifyPassword<br />
    <br />

    请求参数：{"CustomerID":"853","OldUserPassword":"456456","NewUserPassword":"45364568"}<br />
    <br />

    返回结果：{"msgcode":0,"msginfo":"密码修改失败:老密码不正确"}<br />
    <br />

    <h4>五、个人资料</h4>
    <br />
    <b>5.1、客户个人资料</b><br />
    <br />
    方法名：GetCustomerInfo<br />
    <br />

    请求参数：{"CustomerID":"853"}<br />
    <br />

    返回结果：{"msgcode":0,"msginfo":"获取客户资料失败:请检查客户标识"}<br />
    {"msgcode":1,"msginfo":"{"CustomerID":853,"UserName":"shunyi","UserPassword":"021291855983A45577D05E49F86DA527","RealName":" ","NickName":"456456","Rebate":0.00,"FancyRebate":0.00,"RingRebate":1.00,"Mobile":"456456","LoginCount":0,"DiamondCount":0,"CreateTime":"2016-07-08 15:32:08","SysStatus":2,"Balance":0.00,"PendingtheAmount":0.00,"Directpurchase":0}"}<br />
    <br />

    <b>5.2、团队个人资料</b><br />
    <br />
    方法名：GetUserInfo<br />
    <br />

    请求参数：{"UserID":"853"}<br />
    <br />

    返回结果：{"msgcode":0,"msginfo":"获取团队资料失败:请检查团队标识"}<br />
    {"msgcode":1,"msginfo":"{"Discount":"","UserID":712,"UserName":"admin","UserPassword":"B51E8DBEBD4BA8A8F342190A4B9F08D7","RoleID":"(1)","Comments":"","Sex":1,"Tel":"13530416858","Mobile":"13530416858","Email":"admin@checkgems.com","Qq":"","Skype":"","OtherContacts":"twitter","SysStatus":1,"CreateTime":"2014-11-06 19:10:38","RealName":"AD","LastActiveTime":"2016-07-05 19:43:58","MobileVerifyStatus":1,"EmailVerifyStatus":1,"LoginCount":4025,"Department":"管理层","RapnetAccount":""}"}<br />
    <br />

    <h4>六、在线库存</h4>
    <br />
    <b>6.1、获取在线库存</b><br />
    <br />
    方法名：GetInventoryInfos<br />
    <br />

    请求参数："{\r\n  \"CustomerID\": 850,\r\n  \"useDict\": true,\r\n  \"limit\": 200,\r\n  \"Shape\": [\r\n    \"1\"\r\n  ],\r\n  \"sort\": [\r\n\"OriginUSDPerGrain\",\r\n\"asc\"\r\n  ],\r\n  \"IsFancy\": \"0\",\r\n  \"onlyCount\": false\r\n}"<br />
    <br />

    返回结果：{"msgcode":0,"msginfo":"获取客户资料失败:请检查客户标识"}<br />   
    <br />

    <h4>七、购物车</h4>
    <br />
    <b>7.1、客户加入购物车</b><br />
    <br />
    方法名：GetCustomerInfo<br />
    <br />

    请求参数：{"CustomerID":"853"}<br />
    <br />

    返回结果：{"msgcode":0,"msginfo":"获取客户资料失败:请检查客户标识"}<br />   
    <br />

    <b>7.2、客户移除购物车</b><br />
    <br />
    方法名：GetCustomerInfo<br />
    <br />

    请求参数：{"CustomerID":"853"}<br />
    <br />

    返回结果：{"msgcode":0,"msginfo":"获取客户资料失败:请检查客户标识"}<br />   
    <br />

    <b>7.3、客户购物车列表</b><br />
    <br />
    方法名：GetCustomerInfo<br />
    <br />

    请求参数：{"CustomerID":"853"}<br />
    <br />

    返回结果：{"msgcode":0,"msginfo":"获取客户资料失败:请检查客户标识"}<br />   
    <br />


    <h4>八、提交订单</h4>
    <br />
    <b>8.1、客户确认提交订单</b><br />
    <br />
    方法名：GetCustomerInfo<br />
    <br />

    请求参数：{"CustomerID":"853"}<br />
    <br />

    返回结果：{"msgcode":0,"msginfo":"获取客户资料失败:请检查客户标识"}<br />   
    <br />
</body>
</html>
